<div class="modal_form">
  <h5 i18n="@@csv-upload.upload_csv_title">Upload csv file with Study Instance UIDs</h5>
  <div class="content">
    <form [formGroup]="form" >
    <div class="form_control" *ngFor="let form of params.formSchema">
      <label>{{form.description}}</label>
      <ng-container [ngSwitch]="form.tag">
        <mat-select *ngSwitchCase="'select'" formControlName="{{form.filterKey}}" placeholder="{{form.placeholder}}" class="form-control" >
          <mat-option *ngIf="form.showStar" value="*">*</mat-option>
          <mat-option *ngFor="let ae of form.options" value="{{ae.value}}">{{ae.text}}</mat-option>
        </mat-select>
        <input *ngSwitchCase="'input'" formControlName="{{form.filterKey}}" type="{{form.type}}" placeholder="{{form.placeholder}}" class="form-control" (change)="inputChanged(form,$event)" >
        <range-picker
                class="form-control"
                [ngStyle]="form.style"
                *ngSwitchCase="'range-picker-time'"
                [onlyDate]="form.onlyDate"
                [model]="model[form.filterKey]"
                (modelChange)="dateChanged(form.filterKey, $event)"
                placeholder="{{form.description || form.placeholder}}"
                dateFormat="YYYYMMDD"
                onlySingleMode="true"
                defaultTime="00:00:00"
                mode="single"
                title="{{form.description}}"
        ></range-picker>
      </ng-container>
    </div>
      <div class="form_control">
        <label i18n="@@csv-upload.select_csv_file">Select CSV-File:</label>
        <input type="file" (change)="onFileChange($event)" class="form-control">
      </div>
      <div class="dialogbuttons">
        <button class="save" (click)="submit()" [disabled]="!form.valid || !csvFile">
          <span *ngIf="showLoader" class="fa fa-circle-o-notch fa-spin csv_upload_loader"></span>
          <ng-container i18n="@@upload">Upload</ng-container>
        </button>
      </div>
    </form>
  </div>
</div>
